/*
* Copyright (c) 2020 - 2025 Renesas Electronics Corporation and/or its affiliates
*
* SPDX-License-Identifier: BSD-3-Clause
*/

/***********************************************************************************************************************
 * Includes
 **********************************************************************************************************************/
#include "r_rsip_primitive.h"
#include "r_rsip_util.h"

/***********************************************************************************************************************
 * Global variables
 **********************************************************************************************************************/

uint32_t         S_RAM[RSIP_PRV_WORD_SIZE_S_RAM];
uint32_t         S_HEAP[RSIP_PRV_WORD_SIZE_S_HEAP];
uint32_t         S_INST[RSIP_PRV_WORD_SIZE_S_INST];
uint32_t const * S_INST2;

uint32_t const s_flash[] =
{
    BSWAP_32BIG_C(0xf7bd3a99U), BSWAP_32BIG_C(0x2af8b50cU), BSWAP_32BIG_C(0x849fbc02U), BSWAP_32BIG_C(0xac92013bU),
    BSWAP_32BIG_C(0xf6b4b276U), BSWAP_32BIG_C(0x5ae7f353U), BSWAP_32BIG_C(0x9a4fa9f1U), BSWAP_32BIG_C(0x3e926511U),
    BSWAP_32BIG_C(0x856d1a74U), BSWAP_32BIG_C(0xc2247400U), BSWAP_32BIG_C(0xc37f1e72U), BSWAP_32BIG_C(0xe2545064U),
    BSWAP_32BIG_C(0xc25decb9U), BSWAP_32BIG_C(0xbaf5fe0fU), BSWAP_32BIG_C(0x63edd15aU), BSWAP_32BIG_C(0xd5fb9ca0U),
    BSWAP_32BIG_C(0xd4dfdc5bU), BSWAP_32BIG_C(0x607fccd6U), BSWAP_32BIG_C(0x9ef3ecadU), BSWAP_32BIG_C(0x1ad29a82U),
    BSWAP_32BIG_C(0xdd639c7eU), BSWAP_32BIG_C(0xefb1e9a9U), BSWAP_32BIG_C(0xbf8a13f2U), BSWAP_32BIG_C(0x6a12e478U),
    BSWAP_32BIG_C(0xa7009750U), BSWAP_32BIG_C(0xffb5e1fbU), BSWAP_32BIG_C(0xd0990db2U), BSWAP_32BIG_C(0xc6cfeaeaU),
    BSWAP_32BIG_C(0x0cb47a0eU), BSWAP_32BIG_C(0xfedd8e04U), BSWAP_32BIG_C(0x3f3c29cdU), BSWAP_32BIG_C(0x0c131f42U),
    BSWAP_32BIG_C(0x2a579c73U), BSWAP_32BIG_C(0x98017e5fU), BSWAP_32BIG_C(0xefdb84adU), BSWAP_32BIG_C(0xd6a6ca03U),
    BSWAP_32BIG_C(0x96fb8f2bU), BSWAP_32BIG_C(0x813d32c8U), BSWAP_32BIG_C(0xe4532698U), BSWAP_32BIG_C(0x9cb20c0eU),
    BSWAP_32BIG_C(0x488f51e3U), BSWAP_32BIG_C(0xfc9a63abU), BSWAP_32BIG_C(0x1a32d2e1U), BSWAP_32BIG_C(0x5149e11bU),
    BSWAP_32BIG_C(0xfe147036U), BSWAP_32BIG_C(0x5c36bff8U), BSWAP_32BIG_C(0xd9bf754fU), BSWAP_32BIG_C(0x7c546440U),
    BSWAP_32BIG_C(0x616db985U), BSWAP_32BIG_C(0x2dd64c56U), BSWAP_32BIG_C(0x1cbccb7fU), BSWAP_32BIG_C(0xc13e4d96U),
    BSWAP_32BIG_C(0xfaf5f1cbU), BSWAP_32BIG_C(0x3f2a8c4bU), BSWAP_32BIG_C(0xa0c32020U), BSWAP_32BIG_C(0xb61bd532U),
    BSWAP_32BIG_C(0xa9969048U), BSWAP_32BIG_C(0x1d0e1f64U), BSWAP_32BIG_C(0x54b1410bU), BSWAP_32BIG_C(0xf7563ff1U),
    BSWAP_32BIG_C(0x68109923U), BSWAP_32BIG_C(0x71bc5af6U), BSWAP_32BIG_C(0xd598f81cU), BSWAP_32BIG_C(0xd0d63f2fU),
    BSWAP_32BIG_C(0x14b8923fU), BSWAP_32BIG_C(0xce554521U), BSWAP_32BIG_C(0x6c6c68bbU), BSWAP_32BIG_C(0x99b45d33U),
    BSWAP_32BIG_C(0xf2995eecU), BSWAP_32BIG_C(0x6c9017f4U), BSWAP_32BIG_C(0x88c74249U), BSWAP_32BIG_C(0x2e81b309U),
    BSWAP_32BIG_C(0x15ba7a1eU), BSWAP_32BIG_C(0x964fbe45U), BSWAP_32BIG_C(0xdbc656b6U), BSWAP_32BIG_C(0x9b5cf228U),
    BSWAP_32BIG_C(0x35664902U), BSWAP_32BIG_C(0xfae43331U), BSWAP_32BIG_C(0x40794523U), BSWAP_32BIG_C(0xb2b58019U),
    BSWAP_32BIG_C(0x085d57e3U), BSWAP_32BIG_C(0x924d55adU), BSWAP_32BIG_C(0xbe48d5d9U), BSWAP_32BIG_C(0x535e8cb9U),
    BSWAP_32BIG_C(0xbae8176aU), BSWAP_32BIG_C(0x645b9a4dU), BSWAP_32BIG_C(0x79a1cb7bU), BSWAP_32BIG_C(0x92a920efU),
    BSWAP_32BIG_C(0xd533fba8U), BSWAP_32BIG_C(0x786203fdU), BSWAP_32BIG_C(0xf38e0fdeU), BSWAP_32BIG_C(0xf2611be2U),
    BSWAP_32BIG_C(0x8176e598U), BSWAP_32BIG_C(0x8d15ae1fU), BSWAP_32BIG_C(0x180590d8U), BSWAP_32BIG_C(0x1b5d6980U),
    BSWAP_32BIG_C(0x807ceaf3U), BSWAP_32BIG_C(0xabeca44bU), BSWAP_32BIG_C(0x24b92de8U), BSWAP_32BIG_C(0x4fe819b1U),
    BSWAP_32BIG_C(0x59c3b720U), BSWAP_32BIG_C(0xae83a812U), BSWAP_32BIG_C(0x45252acaU), BSWAP_32BIG_C(0xedf50cdcU),
    BSWAP_32BIG_C(0xa76d8542U), BSWAP_32BIG_C(0x6ea056b9U), BSWAP_32BIG_C(0x2d5c4343U), BSWAP_32BIG_C(0xfb41d816U),
    BSWAP_32BIG_C(0x2d772dfaU), BSWAP_32BIG_C(0x7322968dU), BSWAP_32BIG_C(0xa48225e5U), BSWAP_32BIG_C(0xb6d795ddU),
    BSWAP_32BIG_C(0x2d61254cU), BSWAP_32BIG_C(0xe31be2f3U), BSWAP_32BIG_C(0x0cd72344U), BSWAP_32BIG_C(0xf6971fa7U),
    BSWAP_32BIG_C(0x73d951e2U), BSWAP_32BIG_C(0x1048fae1U), BSWAP_32BIG_C(0xa85a1d70U), BSWAP_32BIG_C(0x2381b2d1U),
    BSWAP_32BIG_C(0x4de4328eU), BSWAP_32BIG_C(0xc45505a4U), BSWAP_32BIG_C(0xbb25b3ddU), BSWAP_32BIG_C(0xbe9cc96cU),
    BSWAP_32BIG_C(0x7138d76bU), BSWAP_32BIG_C(0x7b42416aU), BSWAP_32BIG_C(0xda0dd724U), BSWAP_32BIG_C(0x6684cab2U),
    BSWAP_32BIG_C(0xf9123e22U), BSWAP_32BIG_C(0x998914bbU), BSWAP_32BIG_C(0xff8cac4cU), BSWAP_32BIG_C(0xd10cf975U),
    BSWAP_32BIG_C(0x198d1258U), BSWAP_32BIG_C(0x1e6ee11fU), BSWAP_32BIG_C(0x1c109319U), BSWAP_32BIG_C(0xa0f84df5U),
    BSWAP_32BIG_C(0x877cc534U), BSWAP_32BIG_C(0x0ac26289U), BSWAP_32BIG_C(0x55cc809aU), BSWAP_32BIG_C(0xc0f92a70U),
    BSWAP_32BIG_C(0x2164fe35U), BSWAP_32BIG_C(0x5ec17ad6U), BSWAP_32BIG_C(0x6894c3a1U), BSWAP_32BIG_C(0xb7d18a74U),
    BSWAP_32BIG_C(0x119c4f8fU), BSWAP_32BIG_C(0xb0022075U), BSWAP_32BIG_C(0x1cd03146U), BSWAP_32BIG_C(0xbc255a52U),
    BSWAP_32BIG_C(0x5926e9fcU), BSWAP_32BIG_C(0x426aafe5U), BSWAP_32BIG_C(0xe6e77b32U), BSWAP_32BIG_C(0x3ade8c51U),
    BSWAP_32BIG_C(0x3a01c9d7U), BSWAP_32BIG_C(0x95da3735U), BSWAP_32BIG_C(0x1e726efeU), BSWAP_32BIG_C(0x8f2db085U),
    BSWAP_32BIG_C(0x8bee46deU), BSWAP_32BIG_C(0xca780235U), BSWAP_32BIG_C(0x050d3180U), BSWAP_32BIG_C(0x580361e4U),
    BSWAP_32BIG_C(0x824fe25bU), BSWAP_32BIG_C(0xbfc03eb0U), BSWAP_32BIG_C(0x279a0469U), BSWAP_32BIG_C(0x67de1a0aU),
    BSWAP_32BIG_C(0x25373aceU), BSWAP_32BIG_C(0xee2d0622U), BSWAP_32BIG_C(0x32700193U), BSWAP_32BIG_C(0x8af35099U),
    BSWAP_32BIG_C(0xe2a374c8U), BSWAP_32BIG_C(0x2720cbe8U), BSWAP_32BIG_C(0x256bcb25U), BSWAP_32BIG_C(0x1fb46915U),
    BSWAP_32BIG_C(0xe0cd994eU), BSWAP_32BIG_C(0x2d14484fU), BSWAP_32BIG_C(0x47a95a35U), BSWAP_32BIG_C(0x18d60a23U),
    BSWAP_32BIG_C(0x2e83acafU), BSWAP_32BIG_C(0xff33d836U), BSWAP_32BIG_C(0xde900447U), BSWAP_32BIG_C(0xd00d9ed8U),
    BSWAP_32BIG_C(0x46e036b8U), BSWAP_32BIG_C(0xdaaf1452U), BSWAP_32BIG_C(0x7b3f3422U), BSWAP_32BIG_C(0xc50bb82fU),
    BSWAP_32BIG_C(0xe848cc4eU), BSWAP_32BIG_C(0x3b63c38dU), BSWAP_32BIG_C(0xd4a3aeb7U), BSWAP_32BIG_C(0x816f5549U),
    BSWAP_32BIG_C(0x8a1ad3aeU), BSWAP_32BIG_C(0x65a16c97U), BSWAP_32BIG_C(0x44ae2affU), BSWAP_32BIG_C(0xd434cd52U),
    BSWAP_32BIG_C(0xd2c900b3U), BSWAP_32BIG_C(0xc04bd425U), BSWAP_32BIG_C(0x7a446a67U), BSWAP_32BIG_C(0xf1ffd594U),
    BSWAP_32BIG_C(0x141f6ec5U), BSWAP_32BIG_C(0x6b481bf0U), BSWAP_32BIG_C(0x14bc9872U), BSWAP_32BIG_C(0xea69c29aU),
    BSWAP_32BIG_C(0x3557070fU), BSWAP_32BIG_C(0xbc841205U), BSWAP_32BIG_C(0x5f37e1adU), BSWAP_32BIG_C(0x362cc327U),
    BSWAP_32BIG_C(0xd0476a6bU), BSWAP_32BIG_C(0x0f9d70b8U), BSWAP_32BIG_C(0xcb742fc5U), BSWAP_32BIG_C(0x66234669U),
    BSWAP_32BIG_C(0x89208007U), BSWAP_32BIG_C(0x588122e4U), BSWAP_32BIG_C(0x78600d71U), BSWAP_32BIG_C(0xcfbe63c9U),
    BSWAP_32BIG_C(0x42a44584U), BSWAP_32BIG_C(0x66374b1eU), BSWAP_32BIG_C(0x2cca3172U), BSWAP_32BIG_C(0x8c463ff7U),
    BSWAP_32BIG_C(0x242ca0bcU), BSWAP_32BIG_C(0xba184637U), BSWAP_32BIG_C(0xf614a34fU), BSWAP_32BIG_C(0x1ff10be2U),
    BSWAP_32BIG_C(0x535bc9f0U), BSWAP_32BIG_C(0xda9d58f5U), BSWAP_32BIG_C(0x58e8c2c4U), BSWAP_32BIG_C(0xbe033d41U),
    BSWAP_32BIG_C(0xedb0997aU), BSWAP_32BIG_C(0x4a31e1f9U), BSWAP_32BIG_C(0x16f49d32U), BSWAP_32BIG_C(0x0430fe8eU),
    BSWAP_32BIG_C(0xd4fd6967U), BSWAP_32BIG_C(0xa2732d78U), BSWAP_32BIG_C(0x2fbd0b5fU), BSWAP_32BIG_C(0xf24aa2e0U),
    BSWAP_32BIG_C(0x4c041102U), BSWAP_32BIG_C(0xe2d3b97cU), BSWAP_32BIG_C(0xc7bf8d57U), BSWAP_32BIG_C(0xfd7a0a91U),
    BSWAP_32BIG_C(0x7270f6ddU), BSWAP_32BIG_C(0x9372a7c2U), BSWAP_32BIG_C(0x2e49bd41U), BSWAP_32BIG_C(0x885762d2U),
    BSWAP_32BIG_C(0xad3758b6U), BSWAP_32BIG_C(0xb21d0b34U), BSWAP_32BIG_C(0x950b1de0U), BSWAP_32BIG_C(0xc13a2a0bU),
    BSWAP_32BIG_C(0x2cdfea8fU), BSWAP_32BIG_C(0xd2b90068U), BSWAP_32BIG_C(0xdb6b6983U), BSWAP_32BIG_C(0x8040d3e9U),
    BSWAP_32BIG_C(0x4a008b64U), BSWAP_32BIG_C(0x43153063U), BSWAP_32BIG_C(0x4d181ec2U), BSWAP_32BIG_C(0x7c056dfbU),
    BSWAP_32BIG_C(0x7d0511ddU), BSWAP_32BIG_C(0x026a9a2eU), BSWAP_32BIG_C(0x4cffc3eeU), BSWAP_32BIG_C(0x798d8bf0U),
    BSWAP_32BIG_C(0xba2170f7U), BSWAP_32BIG_C(0xa6e5b33aU), BSWAP_32BIG_C(0x24e4464fU), BSWAP_32BIG_C(0xf3318401U),
    BSWAP_32BIG_C(0xe7ee6106U), BSWAP_32BIG_C(0x6e1c52f5U), BSWAP_32BIG_C(0x31b57c3bU), BSWAP_32BIG_C(0x09ba1328U),
    BSWAP_32BIG_C(0x91c5c69dU), BSWAP_32BIG_C(0x8ae40098U), BSWAP_32BIG_C(0x4d5d3a00U), BSWAP_32BIG_C(0x891327e9U),
    BSWAP_32BIG_C(0xbe31c437U), BSWAP_32BIG_C(0x805ea43fU), BSWAP_32BIG_C(0xbc463f3cU), BSWAP_32BIG_C(0x519535a4U),
    BSWAP_32BIG_C(0x009e8a68U), BSWAP_32BIG_C(0xd03ac0ecU), BSWAP_32BIG_C(0x8a3eed9fU), BSWAP_32BIG_C(0x72f1f31dU),
    BSWAP_32BIG_C(0x44e2f9f5U), BSWAP_32BIG_C(0x1f282d7cU), BSWAP_32BIG_C(0x0ef01fb5U), BSWAP_32BIG_C(0x79030f6bU),
    BSWAP_32BIG_C(0x0a6b992aU), BSWAP_32BIG_C(0x62e7554eU), BSWAP_32BIG_C(0x489512d5U), BSWAP_32BIG_C(0xafaf6fe2U),
    BSWAP_32BIG_C(0xf8a69f99U), BSWAP_32BIG_C(0xb197cf7aU), BSWAP_32BIG_C(0x5ba42457U), BSWAP_32BIG_C(0xb15ad9bdU),
};
